<template>
	<view class="author-item" @click.stop="navigateTo" :data-url="'/pages/mypage/mypage?id='+item._id">
		<avatar class="avatar" :src="item.avatarUrl" :name="item.name" circle></avatar>
		<view>
			<view class="name">{{item.name}}</view>
			<view class="songCount">{{item.songCount}} 声乐</view>
		</view>
	</view>
</template>

<script>
	export default{
		props: ['item'],
		methods:{
			navigateTo(e){
				uni.navigateTo({
					url: e.currentTarget.dataset.url
				})
			}
		}
	}
</script>

<style lang="scss">
	.author-item{
		display: flex;
		align-items: center;
		padding: 40upx 0;
		.avatar{
			margin-right: 40upx;
		}
		.name{
			letter-spacing: 2upx;
			font-size: $font-size-md;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 1;
			overflow: hidden;
		}
		.songCount{
			font-size: $font-size-sm;
			opacity: 0.5;
			margin-top: 15upx;
		}
	}
</style>
